<template>
  <div class="my_popup">
    <van-popup
      v-model="curShow"
      position="bottom"
      :style="{ height: popupHeight }"
    >
      <slot name="top"></slot>
    </van-popup>
  </div>
</template>

<script>
export default {
  name: 'mypopop',
  props: {
    show: {
      type: Boolean,
      default: false
    },
    popupHeight: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      curShow: false
    }
  },
  watch: {
    show(v) {
      this.curShow = v
    },
    curShow(v) {
      this.$emit('showChange', v)
    }
  }
}
</script>

<style scoped lang="less"></style>
